import service from '@/utils/request'
// @Tags BuyerInfo
// @Summary 创建购买方信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.BuyerInfo true "创建购买方信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /buyerInfo/createBuyerInfo [post]
export const createBuyerInfo = (data) => {
  return service({
    url: '/buyerInfo/createBuyerInfo',
    method: 'post',
    data
  })
}

// @Tags BuyerInfo
// @Summary 删除购买方信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.BuyerInfo true "删除购买方信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /buyerInfo/deleteBuyerInfo [delete]
export const deleteBuyerInfo = (params) => {
  return service({
    url: '/buyerInfo/deleteBuyerInfo',
    method: 'delete',
    params
  })
}

// @Tags BuyerInfo
// @Summary 批量删除购买方信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除购买方信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /buyerInfo/deleteBuyerInfo [delete]
export const deleteBuyerInfoByIds = (params) => {
  return service({
    url: '/buyerInfo/deleteBuyerInfoByIds',
    method: 'delete',
    params
  })
}

// @Tags BuyerInfo
// @Summary 更新购买方信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.BuyerInfo true "更新购买方信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /buyerInfo/updateBuyerInfo [put]
export const updateBuyerInfo = (data) => {
  return service({
    url: '/buyerInfo/updateBuyerInfo',
    method: 'put',
    data
  })
}

// @Tags BuyerInfo
// @Summary 用id查询购买方信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.BuyerInfo true "用id查询购买方信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /buyerInfo/findBuyerInfo [get]
export const findBuyerInfo = (params) => {
  return service({
    url: '/buyerInfo/findBuyerInfo',
    method: 'get',
    params
  })
}

// @Tags BuyerInfo
// @Summary 分页获取购买方信息列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取购买方信息列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /buyerInfo/getBuyerInfoList [get]
export const getBuyerInfoList = (params) => {
  return service({
    url: '/buyerInfo/getBuyerInfoList',
    method: 'get',
    params
  })
}

// @Tags BuyerInfo
// @Summary 不需要鉴权的购买方信息接口
// @Accept application/json
// @Produce application/json
// @Param data query fapiaoReq.BuyerInfoSearch true "分页获取购买方信息列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /buyerInfo/getBuyerInfoPublic [get]
export const getBuyerInfoPublic = () => {
  return service({
    url: '/buyerInfo/getBuyerInfoPublic',
    method: 'get',
  })
}
